package PTA.javaA;
import java.util.Scanner;
  import java.util.Arrays;

    public class Main {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            while (scanner.hasNextInt()) {
                int n = scanner.nextInt();
                String[][] arr = new String[n][n];
                for (int i = 0; i < n; i++) {
                    for (int j = 0; j <= i; j++) {
                        String str = (i + 1) + "*" + (j + 1) + "=" + (i + 1) * (j + 1);
                        System.out.print(str);
                        arr[i][j] = str;
                        if (j < i){
                            int space = Math.max((7 - str.length()), 0);
                            for (int k = 0; k < space; k++) {
                                System.out.print(" ");
                            }
                        }
                    }
                    System.out.println();
                }
                System.out.println(Arrays.deepToString(arr).replace(", null",""));
            }

    }

}
